class Programer(object):
    # procount = 0

    hobby = 'Play Computer'

    def __init__(self, name, age, weight):
        self.name = name
        # if isinstance(age, int):
        self.age = age
        # else:
        #     raise Exception('age must be int')
        self._weight = weight



    # procount += 1

    @classmethod
    def get_hobby(cls):
        return cls.hobby

    @property
    def get_weight(self):
        return self._weight

    def self_introduction(self):
        print
        'My name is %s \nI am %s years ald\n' % (self.name, self.age)
    # def getweight(self):
    #     return self.weight

    # def getName(self):
    #     return self.name


class ZhangSanProgramer(Programer):
    def __init__(self, name, age, weight):
        # Programer.__init__()
        super(ZhangSanProgramer, self).__init__(name, age, weight)


class BackendProgramer(Programer):  # 继承Programer
    def __init__(self, name, age, weight, luanguage):
        super(BackendProgramer, self).__init__(name, age, weight)  # 调用父类de
    # self.luanguage = luanguage


if __name__ == '__main__':
    number = 1

programer = Programer('AAA', 18, 120)
backend_programer = BackendProgramer('belle', 20, 130, 'Python')
print('哈哈==%s' % (dir(programer)))
print(programer.get_hobby())
print(programer.get_weight)

# programer.self_introduction()
